package fr.ssd.sic.ui;

import javax.mail.Folder;
import javax.swing.JTree;
import javax.swing.tree.DefaultMutableTreeNode;

public class JTreeFolder extends JTree {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6368991975336851627L;

	public JTreeFolder(DefaultMutableTreeNode tree) {
		super(tree);
	}

	@Override
	public String convertValueToText(Object value, boolean selected,
			boolean expanded, boolean leaf, int row, boolean hasFocus) {
		
		DefaultMutableTreeNode node = (DefaultMutableTreeNode)value;
		Folder folder = (Folder)node.getUserObject();
		return folder.getName();
	}

}
